#ifndef BOARD_EX_H
#define BOARD_EX_H

#include "board.h"

struct device_info 
{
  char device_name[32];
  char uid[40];
  unsigned long firmware_version;
  unsigned long up_time;
  double cpu_usage;
  double memory_usage;
  double temperature;
};

struct led {
  unsigned long number;
  bool state;
};

struct buzzer {
  unsigned long frequency;
  bool state;
};

struct ds18b20 {
  double temperature;
  double accuracy;
};

struct ecat_status {
  char slave_state[16];          
  char sync_mode[16];            
  double sync_period_us;            
  double sync_jitter_ns;           
  uint16_t digital_inputs;       
  uint16_t digital_outputs;      
};

struct ecat_input {
  uint16_t index; 
  uint16_t state;
};

void board_init2(void);
void board_get_device_info(struct device_info*);
void board_reboot(void);
void board_get_led(struct led *);
void board_set_led(struct led *);
void board_get_buzzer(struct buzzer *data);
void board_set_buzzer(struct buzzer *data);
void board_get_ds18b20(struct ds18b20 *data);
void board_update_ds18b20(void);
void board_get_ecat_status(struct ecat_status *data);
void board_get_ecat_input(struct ecat_input *data);
void board_set_ecat_input(struct ecat_input *data);

#endif